﻿using System;
namespace CurrencyRateService
{
    partial class CurrencyService
    {
        /// <summary> 
        /// 必需的设计器变量。
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// 清理所有正在使用的资源。
        /// </summary>
        /// <param name="disposing">如果应释放托管资源，为 true；否则为 false。</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region 组件设计器生成的代码

        /// <summary> 
        /// 设计器支持所需的方法 - 不要
        /// 使用代码编辑器修改此方法的内容。
        /// </summary>
        private void InitializeComponent()
        {
            this.Currency_UpdateRate = new System.Timers.Timer();
            this.Currency_RateFluctuation = new System.Timers.Timer();
            this.Currency_BackRate = new System.Timers.Timer();
            this.Currency_AnalysisRate = new System.Timers.Timer();
            ((System.ComponentModel.ISupportInitialize)(this.Currency_UpdateRate)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.Currency_RateFluctuation)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.Currency_BackRate)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.Currency_AnalysisRate)).BeginInit();
            // 
            // Currency_UpdateRate
            // 
            this.Currency_UpdateRate.Enabled = true;
            this.Currency_UpdateRate.Interval = 3600000D;
            this.Currency_UpdateRate.Elapsed += new System.Timers.ElapsedEventHandler(this.Currency_UpdateRate_Elapsed);
            // 
            // Currency_RateFluctuation
            // 
            this.Currency_RateFluctuation.Enabled = true;
            this.Currency_RateFluctuation.Interval = 3600000D;
            this.Currency_RateFluctuation.Elapsed += new System.Timers.ElapsedEventHandler(this.Currency_RateFluctuation_Elapsed);
            // 
            // Currency_BackRate
            // 
            this.Currency_BackRate.Enabled = true;
            this.Currency_BackRate.Interval = 3600000D;
            this.Currency_BackRate.Elapsed += new System.Timers.ElapsedEventHandler(this.Currency_BackRate_Elapsed);
            // 
            // Currency_AnalysisRate
            // 
            this.Currency_AnalysisRate.Enabled = true;
            this.Currency_AnalysisRate.Interval = 14400000D;
            this.Currency_AnalysisRate.Elapsed += new System.Timers.ElapsedEventHandler(this.Currency_AnalysisRate_Elapsed);
            ((System.ComponentModel.ISupportInitialize)(this.Currency_UpdateRate)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.Currency_RateFluctuation)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.Currency_BackRate)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.Currency_AnalysisRate)).EndInit();

        }

        #endregion

        private System.Timers.Timer Currency_UpdateRate;
        private System.Timers.Timer Currency_RateFluctuation;
        private System.Timers.Timer Currency_BackRate;
        private System.Timers.Timer Currency_AnalysisRate;


    }

    public static class TimerExpand
    {
        public static bool IsTime(this System.Timers.Timer timer, int hour, int minute)
        {
            DateTime dtime = DateTime.Now;
            if ((dtime.Hour == hour && dtime.Minute == minute) || (dtime.Hour == hour && minute == -1))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    }
}
